<?php

class tableDemo extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return CActiveRecord the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'tableDemo';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		return array(
			//array('decimalField','length','max'=>10),
			//array('charField','length','max'=>64),
			//array('boolField, intField', 'numerical', 'integerOnly'=>true),
			//array('doubleField', 'numerical'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		return array(
		);
	}

	public function safeAttributes()
	{
		return array(
			'intField',
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id'=>'Id',
			'boolField'=>'Bool Field',
			'doubleField'=>'Double Field',
			'decimalField'=>'Decimal Field',
			'dateField'=>'Date Field',
			'intField'=>'Int Field',
            'lookupField'=>'LookUp Field',
			'charField'=>'Char Field',
			'textField'=>'Text Field',
			'blobField'=>'Blob Field',
		);
	}
}